package com.lqs.blog.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lqs.blog.pojo.Tag;
import com.lqs.blog.vo.TagVo;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface TagMapper extends BaseMapper<Tag> {
    List<Tag> getTagsByArticleId(Long articleId);

    List<Long> getTagIds(int limit);

    List<Tag> getAllTags(List<Long> tagIds);

    /**
     * 查询热度前n条
     * @param limit
     * @return
     */
    List<Long> getHotTagIds(int limit);

    List<Tag> getTagsByIds(List<Long> tagIds);
}
